package com.hmall.api.pay;

import com.hmall.api.pay.dto.PayOrderDTO;
import com.hmall.api.pay.fallback.PayClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "pay-service", path = "pay-orders",fallbackFactory = PayClientFallbackFactory.class)
public interface PayClient {
    /**
     * 根据交易订单id查询支付单
     * @param id 业务订单id
     * @return 支付单信息
     */
    @GetMapping("/biz/{id}")
    public PayOrderDTO queryPayOrderByBizOrderNo(@PathVariable("id") Long id);

    @PutMapping
    public void updatePayOrder(@RequestParam("orderId") Long orderId);
}
